<?php
session_start();
if ($_SESSION['cid'] == $_GET['c'] && !isset($_SESSION['isOpen'])) {
	$filename = '../brt514/'.$_GET['pdf'];
	header("Expires: -1");
	header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
	header("Content-type: application/pdf;\n");
	header("Content-Transfer-Encoding: binary");
	header("Cache-Control: no-store, no-cache, must-revalidate");
	header("Cache-Control: post-check=0, pre-check=0");
	header("Pragma: no-cache");
	//$len = filesize($filename);
	//header("Content-Length: $len;\n");
	$_SESSION['isOpen'] = 1;
	echo(readfile($filename));
}
?>